/*
 * @description: 
 * @Author: Islands
 * @Date: 2024-03-27 11:55:55
 * @LastEditTime: 2024-03-28 03:04:31
 */

import { request, axiosRequest } from '@/axios/index';
import { AxiosPromise } from "axios";
import { ISearchData, ITableData } from './types.d';
import { IResultPage } from '@/types/index.d'
const evn = import.meta.env.MODE;
/**
 * 获取登录用户信息
 * @returns  IUserInfo
 */
export function queryApi(): AxiosPromise<IResultPage<ITableData>> {
    if (evn === 'test') {
        return request({
            url: "/src/mock/setting/dict.json",
            method: "get",
        });
    } else {
        return request({
            url: "/user/info",
            method: "get",
        });
    }

}